﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EMC.VISITOR.Application.Entity
{
    [SugarTable(null, "车辆扫描次数")]
    [BusinessVS]
    public class HKCarScan : EntityBase
    {
        [SugarColumn(ColumnDescription = "车牌号", IsNullable = true, IndexGroupNameList = new string[] { "index_scan_carno" })]
        public string CarNo { get; set; }
        [SugarColumn(ColumnDescription = "事件Id", IsNullable = true, IndexGroupNameList = new string[] { "index_scan_eid" })]
        public long? HKEventId { get; set; }
        [SugarColumn(ColumnDescription = "访客Id", IsNullable = true, IndexGroupNameList = new string[] { "index_scan_vid" })]
        public long? VisId { get; set; }
        [SugarColumn(ColumnDescription = "是否放行", IsNullable = true)]
        public bool? IsOpen { get; set; } = false;
        [SugarColumn(ColumnDescription = "是否处理此任务", IsNullable = true, IndexGroupNameList = new string[] { "index_scan_handler" })]
        public bool? IsHandler { get; set; } = false;
        [SugarColumn(ColumnDescription = "扫描车牌次数", IsNullable = true)]
        public int? Times { get; set; } = 0;
        [SugarColumn(ColumnDescription = "处理描述",Length =1000, IsNullable = true)]
        public string message { get; set; }
  
        [Navigate(NavigateType.OneToOne, nameof(HKEventId))]
        public HKEvent HEvent { get; set; }
        [Navigate(NavigateType.OneToOne, nameof(VisId))]
        public VisitLog VisLog { get; set; }
    }
}
